<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <select class="province">

    </select>
    <select class="city">

    </select>

    <script>

        var all=[
            {
                province:'广东省',
                code:1,
                city:[
                    '广州',
                    '深圳',
                    '中山',
                    '玉山',
                ]
            },
            {
                province:'广西省',
                code:2,
                city:[
                    '南宁',
                    '柳州',
                    '桂林',
                    '北海',
                ]
            },
            {
                province:'湖南省',
                code:3,
                city:[
                    '长沙',
                    '岳阳',
                    '湘潭',
                    '常德',
                ]
            },
            {
                province:'四川省',
                code:4,
                city:[
                    '成都',
                    '重庆',
                    '天津',
                    '绵阳',
                ]
            },
        ];

        var province=document.querySelector(".province")
    </script>
    
</body>
</html>